home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
bipl.zip
/
PROGS.ZIP
/
PACK.ICN
< prev
next >
Wrap
Text File
|
1992-09-28
|
1KB
|
38 lines
############################################################################
#
# File: pack.icn
#
# Subject: Program to package multiple files
#
# Author: Ralph E. Griswold
#
# Date: May 27, 1989
#
###########################################################################
#
# This programs reads a list of file names from standard input and
# packages the files into a single file, which is written to standard
# output.
#
# Files are separated by a header, ##########, followed by the file
# name. This simple scheme does not work if a file contains such a header
# itself, and it's problematical for files of binary data.
#
############################################################################
#
# See also: unpack.icn
#
############################################################################
procedure main()
local in
while name := read() do {
close(\in)
in := open(name) | stop("cannot open input file: ",name)
write("##########")
write(name)
while write(read(in))
}
end